import request from '@/utils/myrequest'

export function getList(kvs) {
  return request({
    url: 'config/attributes/getlist',
    method: 'get',
    kvs
  })
}

export function getAllAttributes() {
  return request({
    url: 'config/attributes/getlist',
    method: 'get'
  })
}

export function add(kvs) {
  return request({
    url: 'config/attributes/Add',
    method: 'post',
    kvs
  })
}

export function get(kvs) {
  return request({
    url: 'config/attributes/Get',
    method: 'get',
    kvs
  })
}

export function del(kvs) {
  return request({
    url: 'config/attributes/delete',
    method: 'post',
    kvs
  })
}

export function edit(kvs) {
  return request({
    url: 'config/attributes/update',
    method: 'post',
    kvs
  })
}

export function attributenamelist() {
  return request({
    url: 'config/attributes/GetAttributeNameList',
    method: 'get'
  })
}

export function parentattributelist() {
  return request({
    url: 'config/attributes/GetParentAttributeList',
    method: 'get'
  })
}

export function parentattributeaddlist() {
  return request({
    url: 'config/attributes/GetAllAttributesList',
    method: 'get'
  })
}

export function selectitemlist(kvs) {
  return request({
    url: 'config/attributes/GetSelectItemList',
    method: 'get',
    kvs
  })
}

export function getAttributeValues(kvs) {
  return request({
    url: 'config/attributes/GetAttributeValues',
    method: 'get',
    kvs
  })
}

export function getPackageTypeList(kvs) {
  return request({
    url: '/tdm/SBLIndexConfigMain/GetSBLPackaingFormCode',
    method: 'get',
    kvs
  })
}

export function getAttributeDescList(kvs) {
  return request({
    url: '/config/Attributes/GetAttributeDescList',
    method: 'get',
    kvs
  })
}

export default { getList, get, add, edit, del, attributenamelist, parentattributelist, parentattributeaddlist, selectitemlist, getAttributeValues }
